<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <title>德德后台管理系统</title>
  <link rel="stylesheet" href="./assets/layui/css/layui.css">
</head>

<body>
  <div class="layui-layout layui-layout-admin">

    <!--导入头部共公资源  -->
    {{include "./common/header.html"}}

    <div class="layui-side layui-bg-black">
      <!-- 导入左侧部分共公资源 -->
      {{include "./common/side.html"}}
    </div>

    <div class="layui-body">
      <!-- 内容主体区域 -->
      <div style="padding: 15px;">首页--内容主体区域 .</div>
    </div>

    <div class="layui-footer">
      <!-- 底部固定区域 -->
      底部固定区域
    </div>
  </div>
  <script src="https://cdn.bootcdn.net/ajax/libs/js-cookie/3.0.1/js.cookie.min.js"></script>
  <script src="./assets/layui/layui.js"></script>
  <script>

let {username,intro,photo} = JSON.parse(Cookies.get('userInfo'))
    //JS 
    layui.use(['element', 'layer', 'util'], async function () {
      var element = layui.element
        , layer = layui.layer
        , util = layui.util
        , $ = layui.jquery;

        var names = document.getElementById('name')
        names.innerHTML = username

      let res = await $.get('/loginGet')
      let { name, loginName } = res[0]
      let login = document.getElementById('loginText')
      let reslut = `@${name} -${loginName}`
      login.innerHTML = reslut
      localStorage.setItem('loginText', reslut)
    });

  </script>
</body>

</html>